home *** CD-ROM | disk | FTP | other *** search
/ Aminet 5 / Aminet 5 - March 1995.iso / Aminet / dev / misc / LEDA_gene.lha / LEDA-3.1c-generic / incl / LEDA / impl / x_basic.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-05  |  2.8 KB  |  109 lines

  1. /*******************************************************************************
  2. +
  3. +  LEDA  3.1c
  4. +
  5. +
  6. +  x_basic.h
  7. +
  8. +
  9. +  Copyright (c) 1994  by  Max-Planck-Institut fuer Informatik
  10. +  Im Stadtwald, 6600 Saarbruecken, FRG     
  11. +  All rights reserved.
  12. *******************************************************************************/
  13.  
  14.  
  15. #ifndef LEDA_X_BASIC_H
  16. #define LEDA_X_BASIC_H
  17.  
  18. #include <LEDA/impl/x_window.h>
  19.  
  20.  
  21. /* init/close graphics display */
  22.  
  23. void open_display(void);
  24. void close_display(void);
  25. void flush_display(void);
  26.  
  27.  
  28. /* return display parameters */
  29.  
  30. int display_width(void);
  31. int display_height(void);
  32. int display_depth(void);
  33.  
  34. int new_color(const char*);
  35.  
  36.  
  37. /* windows */
  38.  
  39. Window open_window(int x,int y,int width,int height,const char* header,
  40.                                                     const char* label);
  41. void   close_window(Window win);
  42. void   clear_window(Window win, int col=0);
  43. int    window_height(Window win);
  44. int    window_width(Window win);
  45. void   window_position(Window win, int* x, int* y);
  46.  
  47.  
  48. /* drawing */
  49.  
  50. void pixel(Window win, int x, int y);
  51. void pixels(Window win, int n, int* x, int* y);
  52. void line(Window win, int x1, int y1, int x2, int y2);
  53. void rectangle(Window win, int x1, int y1, int x2, int y2);
  54. void box(Window win, int x1, int y1, int x2, int y2);
  55. void arc(Window win,int x0,int y0,int r1,int r2,double start,double angle);
  56. void circle(Window win, int x0, int y0, int r);
  57. void ellipse(Window win, int x0, int y0, int r1, int r2);
  58. void fill_arc(Window win,int x0,int y0,int r1,int r2,double start,double angle);
  59. void fill_circle(Window win, int x0, int y0, int r);
  60. void fill_ellipse(Window win, int x0, int y0, int r1, int r2);
  61. void fill_polygon(Window win, int n, int* xcoord, int* ycoord);
  62. void put_text(Window win, int x, int y, const char* s, int opaque);
  63. void put_ctext(Window win, int x, int y, const char* s, int opaque);
  64.  
  65.  
  66. /* miscellaneous */
  67.  
  68. void copy_rect(Window win, int x1, int y1, int x2, int y2, int x, int y);
  69. void insert_bitmap(Window win, int width, int height, char* data);
  70. void show_coordinates(Window win, const char* s);
  71.  
  72.  
  73. /* text geometry in current font */
  74.  
  75. int text_width(const char* s);
  76. int text_height(const char* s);
  77.  
  78.  
  79. /* loading fonts */
  80.  
  81. int load_text_font(const char* font_name);
  82. int load_bold_font(const char* font_name);
  83. int load_message_font(const char* font_name);
  84.  
  85.  
  86. /* setting parameters */
  87.  
  88. void set_header(Window win, const char *s);
  89. int  set_color(int col);
  90. int  set_mode(int m);
  91. int  set_line_width(int w);
  92. int  set_line_style(int s);
  93. int  set_font(const char* fname);
  94. void set_text_font(void);
  95. void set_bold_font(void);
  96. void set_message_font(void);
  97. void set_read_gc(void);
  98. void reset_gc(void);
  99.  
  100. /* events */
  101.  
  102. int  get_next_event(Window* win, int* val, int* x, int* y, unsigned long *t);
  103. int  check_next_event(Window* win, int* val, int* x, int* y, unsigned long *t);
  104. void put_back_event(void);
  105.  
  106.  
  107. #endif
  108.